package cn.edu.nchu.fragmentdemo.db.dao;
import android.content.Context;
import com.j256.ormlite.dao.Dao;
import cn.edu.nchu.fragmentdemo.bean.Route;
import cn.edu.nchu.fragmentdemo.db.helper.ORMLiteHelper;
import java.sql.SQLException;

/**
 * @author Tsuki
 */
public class RouteDao {

    private static Dao<Route, Integer> Route;


    public static Dao<Route, Integer> getRouteDao(Context context) {
        if (Route == null) {
            synchronized (RouteDao.class) {
                if (Route == null) {
                    try {
                        Route = (Dao) ORMLiteHelper.getInstance(context).getDao(Route.class);
                    } catch (SQLException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                }
            }
        }
        return Route;
    }



}